import React from 'react'
import {RecommendItem_style,TextContent} from './RecommendItem.style'
import loading from '../../../../assets/images/loading.gif'

//懒加载
import LazyLoad from 'react-lazyload'

const RecommendItem=(props)=>{
    const { item } = props;

    return(
        <RecommendItem_style>
            <div className="RecommendItem_img">
                <LazyLoad placeholder={<img src={loading} width="100%" height="100%"/>}>
                <img src={item.imgsrc} alt=""  style={{borderRadius:10}}/>
                </LazyLoad>
            </div>
            <TextContent>
                <div className="RecommendItem_text">【{item.address}】&nbsp;{item.introduce}</div>
                <div className="RecommendItem_time">{item.date}&nbsp;{item.time}&nbsp;周{item.day}</div>
                <div className="RecommendItem_price">￥{item.price}&nbsp;起</div>
            </TextContent>
        </RecommendItem_style>
       
    )
}

export default RecommendItem